home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / CHIP Kasım 1998.iso / emulators / gameboy / vgbdos88dos.exe / CWSDPMI.ZIP / CWSPARAM.DOC < prev    next >
Text File  |  1996-06-15  |  4KB  |  73 lines

  1. CWSPARAM                provided by Charles W Sandmann (sandmann@clio.rice.edu)
  2.                                     1206 Braelinn, Sugarland, TX 77479
  3. CWSPARAM OVERVIEW
  4.  
  5. There are certain parameters built into the CWSDPMI.EXE and CWSDPR0.EXE images
  6. which might need to be modified for distributing some programs for better 
  7. performance.  The modified image could be renamed, and then the DPMI server
  8. name in a DJGPP V2 image may be stubedited to use the new name.  The parameters
  9. which can be modified are discussed below:
  10.  
  11. Full name of paging file ("" to disable) ? [c:\cwsdpmi.swp]
  12.  
  13.  This is where the file which provides virtual memory should be located.  It
  14.  may be desirable to change the default to a faster disk or one with more
  15.  free space.  To disable paging, enter two double quotes.  The file name
  16.  MUST contain the disk, full path, and file name.  Anything less may cause
  17.  unpredictable behavior.  Press return to keep the current value.
  18.  
  19. Number of page tables to initially allocate (0=auto) ? [0]
  20.  
  21.  Page tables are stored in the DOS memory area and consume this precious
  22.  resource.  The default value of 0 chooses automatic allocation of enough
  23.  page tables to hold all of the physical memory without paging (with the 
  24.  minimum enough to hold 20Mb without paging).  If your program is a fixed
  25.  size (and does not spawn any other DPMI images) you can specify one page
  26.  table for each 4Mb of your program's size.  If your program is small, this
  27.  can save a small amount of DOS memory, which might be needed for other
  28.  purposes.  If your program is large (typically larger than the physical
  29.  memory) specifying a number will consume more DOS memory but improve 
  30.  performance since the page tables themselves will not page.  CWSDPMI will
  31.  attempt to dynamically allocate additional page tables at run time to 
  32.  prevent paging, but if all of the DOS memory is free, performance would
  33.  be degraded.  Remember to add an extra page table if mapping physical devices.
  34.  
  35. Minimum application memory desired before 640K paging ? [512Kb]
  36.  
  37.  Typically, CWSDPMI only uses extended memory to return as DPMI memory, and
  38.  saves the DOS memory area for DOS requests.  On small memory machines with
  39.  applications not needing much DOS memory (or poorly tuned memory management)
  40.  there may be very little extended memory left available, with up to 600K of
  41.  DOS memory unused.  This parameter determines the threshold which CWSDPMI
  42.  should start using DOS memory as DPMI memory.  If an application is known to
  43.  not need much DOS memory, this value could be set to the size of the memory
  44.  required for the image, which provides roughly 0.5Mb additional memory before
  45.  paging happens.  This parameter is one I would expect might be adjusted when
  46.  distributing an application for maximum performance on a wide variety of
  47.  machines.
  48.  
  49. Paragraphs of DOS memory to reserve when 640K paging ? [3840]
  50.  
  51.  If the image needs to page in the DOS memory area (triggered by the parameter
  52.  value above), this parameter tells how much DOS memory to save for DOS 
  53.  allocation requests.  The value is in paragraphs (16 byte increments), so the
  54.  default is 60Kbytes.  You will actually end up with a bit more probably, since
  55.  the page tables are allocated on 4Kbyte rounded boundaries.  Some amount of
  56.  DOS memory needs to be saved for potentially expanding the file table, the
  57.  sbrk() algorithm, DMA buffers, etc.  This amount can be tuned on an image
  58.  by image basis, and may be as little as 0.
  59.  
  60. Paragraphs of memory for extra CWSDPMI internal heap ? [128]
  61.  
  62.  CWSDPMI is built with an internal 4K heap.  Each nested task consumes around
  63.  300 bytes, each memory zone takes 14 bytes, and each HW interrupt (nested)
  64.  takes around 850 bytes.  If extra DOS memory is available, the additional
  65.  paragraphs specified here are added to the heap at execution time by DOS.
  66.  The r1 default of 4K was too little for programs which allocated over 
  67.  around 12Mb of memory in very small requests.  The 6K default should be good
  68.  for up to 21Mb in small requests.  If you compile very large C++ programs
  69.  or allocate lots of memory in small pieces, you might need to bump this
  70.  parameter.  If you are very tight on memory, you could decrease it to zero
  71.  and pick up another 2K of DOS memory.  Each paragraph allows a little more
  72.  than one more memory zone (or in the worse case around 64K of memory).
  73.